<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
		

	var obj = new Object();
	var add = new Function('a', 'b', 'return a + b;');

	console.log(obj instanceof Object);
	console.log(add instanceof Function);


	var bottle = new Bottle('杯子', 59, true);
	console.log(bottle instanceof Bottle);

	var bottle1 = new Bottle('高档保温杯', 159, true);
	console.log(bottle1 instanceof Bottle);

	function Bottle(name, price, isKeepWarm) {
		this.name = name;
		this.price = price;
		this.isKeepWarm = isKeepWarm;
	}



	function Bottle(name, price, isKeepWarm) {
		this.name = name;
		this.price = price;
		this.isKeepWarm = isKeepWarm;

		this.sayHello = function() {
			console.log('hello!');
		};


		this.sayHello = new Function('console.log("hello!");');
	}


	var bottle = new Bottle('杯子', 59, true);
	var bottle1 = new Bottle('高档保温杯', 159, true);



	</script>
	
	<p>请用 f12 查看此 html 的script标签</p>
</body>
</html>